<h2 class="popover-title">Nhóm bạn bè</h2>
<div id="notification">
  <?php if (isset($success)) : ?>
    <?php if ($success == true) : ?>
      <div class="alert alert-success"><?= $msg ?></div>
    <?php else : ?>
      <div class="alert alert-error"><?= $msg ?></div>
    <?php endif; ?>
  <?php endif; ?>
</div>
<div id="action">
  <a class="btn btn-success" href="<?= URL ?>?page=nhom_ban_be&act=add_new">
    <i class="icon-white icon-plus"></i> Thêm mới
  </a>
</div>
<table class="table table-striped table-bordered table-condensed">
  <thead>
    <tr>
      <th>#</th>
      <th class="yellow">Tên nhóm</th>
      <th class="blue">Mô tả</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <?php $count = 0; foreach ($groups as $group): ?>
    <tr>
      <td><?= ++$count ?></td>
      <td><?= $group['name'] ?></td>
      <td><?= $group['description'] ?></td>
      <td>
        <a href="<?= URL ?>?page=nhom_ban_be&act=edit&friend_group_id=<?= $group['friend_group_id'] ?>" class="btn btn-mini"><i class="icon-edit"></i></a> 
        <a href="<?= URL ?>?page=nhom_ban_be&act=delete&friend_group_id=<?= $group['friend_group_id'] ?>" class="btn btn-mini btn_delete"><i class="icon-trash"></i></a>
      </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>